package com.acsior.hibernate.vo;

// default package

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * StationCashBox entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "station_cash_boxes")
@GeneratorKey(tableName = "station_cash_boxes")
public class StationCashBoxVO extends HibernatePersistantIntegerIdVO {

	/** */
	private static final long serialVersionUID = 4095627797503121048L;

	// Fields

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "close_employee_id")
	private EmployeeVO closeEmployee;

	@Column(name = "close_time", length = 23)
	private Date closeTime;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "stationCashBox")
	private List<StationCashBoxMoneyContentVO> moneyContents;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "open_employee_id", nullable = false)
	private EmployeeVO openEmployee;

	@Column(name = "open_time", nullable = false, length = 23)
	private Date openTime;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "structure_id", nullable = false)
	private StructureVO structure;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "stationCashBox")
	private List<StationCashBoxTransactionVO> transactions;

	// Constructors

	/** default constructor */
	public StationCashBoxVO() {
		super();
		this.transactions = new ArrayList<StationCashBoxTransactionVO>();
		this.moneyContents = new ArrayList<StationCashBoxMoneyContentVO>();
	}

	/**
	 * @return стойността на closeEmployee
	 */
	public EmployeeVO getCloseEmployee() {
		return this.closeEmployee;
	}

	/**
	 * @return стойността на closeTime
	 */
	public Date getCloseTime() {
		return this.closeTime;
	}

	/**
	 * @return стойността на moneyContents
	 */
	public List<StationCashBoxMoneyContentVO> getMoneyContents() {
		return this.moneyContents;
	}

	/**
	 * @return стойността на openEmployee
	 */
	public EmployeeVO getOpenEmployee() {
		return this.openEmployee;
	}

	/**
	 * @return стойността на openTime
	 */
	public Date getOpenTime() {
		return this.openTime;
	}

	/**
	 * @return стойността на structure
	 */
	public StructureVO getStructure() {
		return this.structure;
	}

	/**
	 * @return стойността на transactions
	 */
	public List<StationCashBoxTransactionVO> getTransactions() {
		return this.transactions;
	}

	/**
	 * @param closeEmployee
	 *            се залага в closeEmployee
	 */
	public void setCloseEmployee(EmployeeVO closeEmployee) {
		this.closeEmployee = closeEmployee;
	}

	/**
	 * @param closeTime
	 *            се залага в closeTime
	 */
	public void setCloseTime(Date closeTime) {
		this.closeTime = closeTime;
	}

	/**
	 * @param moneyContents
	 *            се залага в moneyContents
	 */
	public void setMoneyContents(List<StationCashBoxMoneyContentVO> moneyContents) {
		this.moneyContents = moneyContents;
	}

	/**
	 * @param openEmployee
	 *            се залага в openEmployee
	 */
	public void setOpenEmployee(EmployeeVO openEmployee) {
		this.openEmployee = openEmployee;
	}

	/**
	 * @param openTime
	 *            се залага в openTime
	 */
	public void setOpenTime(Date openTime) {
		this.openTime = openTime;
	}

	/**
	 * @param structure
	 *            се залага в structure
	 */
	public void setStructure(StructureVO structure) {
		this.structure = structure;
	}

	/**
	 * @param transactions
	 *            се залага в transactions
	 */
	public void setTransactions(List<StationCashBoxTransactionVO> transactions) {
		this.transactions = transactions;
	}
}